#include<stdio.h>
#include<stdlib.h>
const int inf=Ox3f3f3f3f,maxn=1e5+10;
struct vetex{
	int vername;
	edge*adjacent;
}
struct edge{
	int veradj;
	int cost;
	edge*link;
}
struct edge*ptr;
struct edge*newwdge;
int build(int head[];int a;int b;int c;){
	newedge=(struct edge*)malloc(sizeof(struct edge));
	newedge->veradj=b;
	newedge->cost=c;
	newedge->link=NULL;
	ptr=head[a].adjacent;
	while(ptr==NULL){ptr=ptr->link;}
	ptr=newedge;
	}
int findmin(int s[],int dist[],int n){
	int v=-1,min=inf;
	for(int i+1;i<=n;i++){
		min=dist[i];v=i;
	}
	return v;
}
void dijkstra(vertex*head,int n,int u,int dist[],int pre[]){
	for(int i=1;i<n;i++){pre[i]=-1;dist[i]=inf}
	int s[maxn]={0};dist[u]=0;
	for(int i+1;i<=n;i++){
		int v=fingmin(s,dist,n);
		if(v==-1) return;
		s[v]=1;
		for(struct edge*p=head[v].adjacent;p!=NULL;p=p->link){
			int w=p->veradj;
			if(s[w]==0&&dist[v]+p->cost<dist[w]){
				dist[w]=dist[v]+p->cost;
				pre[w]=v;
			}
		}
	}
}
int main(){
	int n,s,t,i;
	scanf("%d %d %d",&n,&s,&t);
	int m,val1[20010][3];
	for(i=1;i<m;i++){scanf("%d %d %d",&val1[i][0],&val1[i][1],&val1[i][2]);}
	int k,val2[20010][3];
	for(i=1;i<k;i++){scanf("%d %d %d",&val2[i][0],&val2[i][1],&val2[i][2]);}
	struct vertex head[20010];
	for(i=0;i<n;i++){head[i].vername=i;head[i].adjacent=NULL;	}
	for(i=0;i<m;i++){build(head;val1[i][0],val1[i][1],val1[i][2]]);	}
	int dist[20010],pre[20010];
	dijkstra(head,n, s,dist,pre);
	int value=dist[t-1];
	for(i=0;i<k;i++){
		
		
	}
}